package com.music.utilbean;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.database.sqlite.SQLiteOpenHelper;

public class DBhelper extends SQLiteOpenHelper{

	public DBhelper(Context context, String name, CursorFactory factory,
			int version) {
		super(context, "music.db", null, 5);
	
	}
	
/*
 *long id;//musicstore中的id
 *String title;//歌名
 *String album;//专辑
 *String artist;//歌手
 *long albumId;//专辑ID
 *long duration;//时长
 *long size;//大小
 *String url;//路径
 *int isMusic;//是否为音乐
 *int mp3infoID;//收藏
*/
	@Override
	public void onCreate(SQLiteDatabase db) {
		db.execSQL("create table mymusic(id integer primary key autoincrement,"
	+"title varchar(20),"+"mp3infoID varchar(20))");
		db.execSQL("create table user(id integer primary key autoincrement,"
				+"username varchar(20),"+"password varchar(20))");
	}
   
	@Override
	public void onUpgrade(SQLiteDatabase arg0, int arg1, int arg2) {

	}
  
}
